package com.bckj.fastboot.flow.process.consumer;

import com.bckj.fastboot.core.util.ExecutionContext;
import com.bckj.fastboot.flow.model.*;
import org.springframework.util.PropertyPlaceholderHelper;

public interface BpmnProcessConsumer {

    PropertyPlaceholderHelper PROPERTY_PLACEHOLDER_HELPER = new PropertyPlaceholderHelper("${", "}", null, false);


    default void consume(ExecutionContext context, BpmnStartEvent startEvent) {}

    default void consume(ExecutionContext context, BpmnServiceTask serviceTask) {}

    default void consume(ExecutionContext context, BpmnSequenceFlow sequenceFlow) {}

    default void consume(ExecutionContext context, BpmnEndEvent endEvent) {}

    default void consume(ExecutionContext context, BpmnParallelGateway parallelGateway) {}

    default void consume(ExecutionContext context, BpmnExclusiveGateway exclusiveGateway) {}

    default void consume(ExecutionContext context, BpmnCallActivity callActivity) {}

    default void rollback(ExecutionContext context, Throwable error) {}

    default void callback(ExecutionContext context) {}
}
